<template>
  <div class="page-container">
    <div class="title">感谢您的申请</div>
    <div class="title-tips">
      我们的工作人员会在1-3个工作日及时联系您，请您注意接听趣成长来电。
      您也可以直接拨打我们的客服电话，详情咨询1380000000
    </div>
    <el-button
      :loading="loading"
      class="btn-primary"
      type="primary"
      @click="handleSubmit"
    >
      知道了
    </el-button>
  </div>
</template>
<script>
  export default {
    username: 'ApplySuccess',
    data() {
      const self = this

      return {
        isGetphone: false,
        getPhoneIntval: null,
        phoneCode: '获取验证码',
        showRegister: false,
        nodeEnv: process.env.NODE_ENV,
        title: this.$baseTitle,
        formData: {},
        registerRules: {
          username: [
            { required: true, trigger: 'change', message: '请输入账号' },
            { max: 20, trigger: 'change', message: '最多不能超过20个字' },
            { validator: validateUsername, trigger: 'blur' },
          ],
          phone: [
            { required: true, trigger: 'change', message: '请输入手机号码' },
            { validator: validatePhone, trigger: 'blur' },
          ],
          password: [
            { required: true, trigger: 'change', message: '请输入密码' },
            { validator: validatePassword, trigger: 'blur' },
          ],
          confirmPassword: [
            { required: true, trigger: 'change', message: '请输入确认密码' },
            {
              validator: (rule, value, callback) => {
                if (!isPassword(value)) {
                  callback(new Error('密码不能少于6位'))
                } else if (value !== self.formData.password) {
                  callback(new Error('密码和确认密码要一致'))
                } else {
                  callback()
                }
              },
              trigger: 'change',
            },
          ],
          // phoneCode: [
          //   { required: true, trigger: 'change', message: '请输入手机验证码' },
          // ],
        },
        loading: false,
      }
    },
    methods: {
      handleSubmit() {
        this.$router.push({ path: '/login' })
      },
    },
  }
</script>
<style lang="scss" scoped>
  @import './style.scss';

  .page-container {
    width: 600px;
    height: 100vh;
  }
</style>
